<template>
	<view>
		<view class="balance-records">
			<view class="total-assets">
				<view class="">
					<view class="">总资产(元)</view>
					<view class="amount">0.00</view>
				</view>
				<button class="assets-button">充值</button>
			</view>
			<view class="cumulative-recharge-consume">
				<view class="cumulative-recharge">
					<view>累计充值(元)</view>
					<view class="recharge-amount">0.00</view>
				</view>
				<view class="cumulative-consume">
					<view>累计消费(元)</view>
					<view class="recharge-amount">0.00</view>
				</view>
			</view>
		</view>
		<view class="asset-bottom">
			<view class="asset-bottom-box" v-for="(item,index) in assetData" :key="index">
				<img :src="item.img" alt="" class="asset-image"/>
				<view class="asset-bottom-font">{{item.title}}</view>
			</view>
		</view>
		<u-line type="info"></u-line>
		<view class="popular-activities">
			<view class="activities-title">
				热门活动
			</view>
			<view class="activities-content" v-for="(item,index) in activitiesData" :key="index">
				<view>
					<view class="collect-voucher">{{ item.title }}</view>
					<view class="coupon-contents">{{ item.content }}</view>
					<view class="activities-button">
						<button class="activities-button">立即参与</button>
					</view>
				</view>
				<image :src="item.url" class="activities-image" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 账户明细、充值记录数据
				assetData:[
					{img:'../../../static/logo.png',title:'账户明细'},
					{img:'../../../static/logo.png',title:'充值记录'},
				],
				// 
				activitiesData: [
					{ title:'领取优惠券',content:'每日优惠券抢不停', url:'../../../static/logo.png' },
					{ title:'超值商品 限时秒杀',content:'最新商品秒杀中', url:'../../../static/logo.png' },
				],
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	button::after {
		border: none;
	}

	button {
		padding-left: 20rpx;
		padding-right: 20rpx;
		text-align: center;
		line-height: 1.35;
		overflow: hidden;
	}

	.balance-records {
		margin: 20rpx;
		background-color: rgb(255, 46, 82);
		color: white;
		border-radius: 20rpx;
		padding: 30rpx 20rpx 30rpx 20rpx;
	}
	.total-assets{
		display: flex;
		justify-content: space-between;
	}
	.amount{
		font-size: 100rpx;
	}
	.assets-button{
		height: 100%;
		width: 180rpx;
		color: red;
		margin-left: 45%;
		border-radius: 40rpx;
		padding: 10rpx 0rpx 10rpx 0rpx;
	}
	.cumulative-recharge-consume{
		display: flex;
		align-items: center;
		margin-top: 20rpx;
	}
	.cumulative-consume{
		margin-left: 150rpx;
	}
	.recharge-amount{
		font-size: 50rpx;
	}
	/* 账户明细、充值记录样式 */
	.asset-bottom{
		display: flex;
		/* justify-content: space-between; */
		align-items: center;
		padding: 40rpx 20rpx 40rpx 60rpx;
		text-align: center;
		margin-top: 20rpx;
	}
	.asset-bottom-box{
		margin-right: 10%;
	}
	
	.asset-image{
		width: 80rpx;
		height: 80rpx;
	}
	.popular-activities{
		padding: 20rpx;
		margin-top: 20rpx;
	}
	.activities-title{
		border-left: 10rpx solid red;
		padding: 0rpx 0rpx 0rpx 20rpx;
		font-weight: bold;
		margin-bottom: 20rpx;
	}
	.activities-content{
		background-color: rgb(255, 238, 241);
		padding: 30rpx 20rpx 20rpx 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 40rpx;
	}
	.collect-voucher{
		font-size: 40rpx;
		margin-bottom: 20rpx;
	}
	.coupon-contents{
		color: rgb(146, 146, 146);
		margin-bottom: 40rpx;
	}
	.activities-button{
		background-color: rgb(252, 89, 122);
		border-radius: 40rpx;
		width: 200rpx;
		padding: 5rpx 0rpx 5rpx 0rpx;
		color: #fff;
	}
	.activities-image{
		width: 200rpx;
		height: 200rpx;
	}
</style>